﻿using Vepa.Shared;
namespace Vepa.Server.Database
{
    interface IDatabase
    {
        /// <summary>
        /// Opens the DB connection.
        /// </summary>
        void Open();
        /// <summary>
        /// Creats a new Vepa entry in the DB.
        /// </summary>
        /// <param name="vepa">VepaInfo to create in the DB.</param>
        void createVepaInfo(VepaInfo vepa);
        /// <summary>
        /// Returns a VepaInfo with a given version.
        /// </summary>
        /// <param name="version"></param>
        /// <returns></returns>
        VepaInfo getVepaInfo(int version);
        /// <summary>
        /// Returns all VepaInfos stored in the Database.
        /// </summary>
        /// <returns></returns>
        VepaInfo[] getAllVepaInfos();


        VepaInfo getLatestVepaInfo();


        /// <summary>
        /// Delets a certain VepaInfo.
        /// </summary>
        /// <param name="version"></param>        
        void dropVepaInfo(int version);
    }
}
